var blackList =["big5.icbc.com.cn","spain.icbc.com.cn","m.icbc.com.cn","wap.icbc.com.cn","m.95588.com"];
 var rules = /^[abc24]/;    // /^[a-z|A-Z|0-9]/;
 var components = [];
 var isAddPapiGrayTag = false;
 
 window.advConfig = {
     cisSwitch: true
 }
 
 function getScreenResolution() {
     var resolution = [window.screen.width, window.screen.height]
     //if (options.screen.detectScreenOrientation) {
         resolution.sort().reverse()
     //}
     return resolution
 }
 function getAvailableScreenResolution() {
     if (window.screen.availWidth && window.screen.availHeight) {
       var available = [window.screen.availHeight, window.screen.availWidth]
     //   if (options.screen.detectScreenOrientation) {
         available.sort().reverse()
     //   }
       return available
     }
     // headless browsers
     return 'not available';
 }
 function getTimezone() {
     if (window.Intl && window.Intl.DateTimeFormat) {
         return new window.Intl.DateTimeFormat().resolvedOptions().timeZone || 'not available'
       }
       return 'not available';
 }
 function hasSessionStorage(options) {
     try {
       return !!window.sessionStorage
     } catch (e) {
       return "error"
     }
 }
 function hasLocalStorage(options) {
     try {
         return !!window.localStorage
     } catch (e) {
         return "error"
     }
 }
 function isIEInGray() {
     if (navigator.appName === 'Microsoft Internet Explorer') {
         return true
     } else if (navigator.appName === 'Netscape' && /Trident/.test(navigator.userAgent)) { // IE 11
         return true
     }
     return false
 }
 function isIEOrOldEdge() {
     // The properties are checked to be in IE 10, IE 11 and Edge 18 and not to be in other browsers
     return ('msWriteProfilerMark' in window) + ('msLaunchUri' in navigator) + ('msSaveBlob' in navigator) >= 2
 }
 function hasIndexedDB(options) {
     // IE and Edge don't allow accessing indexedDB in private mode, therefore IE and Edge will have different
     // fingerprints in normal and private modes.
     if (isIEOrOldEdge()) {
         return "excluded"
     }
     try {
         return !!window.indexedDB
     } catch (e) {
         return "error"
     }
 }
 function pluginsComponent(done, options) {
     if (isIEInGray()) {
         return getIEPlugins()
     } else {
         return getRegularPlugins()
     }
 }
 function each(obj, iterator) {
     if (Array.prototype.forEach && obj.forEach === Array.prototype.forEach) {
         obj.forEach(iterator)
     } else if (obj.length === +obj.length) {
         for (var i = 0, l = obj.length; i < l; i++) {
         iterator(obj[i], i, obj)
         }
     } else {
         for (var key in obj) {
         if (obj.hasOwnProperty(key)) {
             iterator(obj[key], key, obj)
         }
         }
     }
 }
 function map(obj, iterator) {
     var results = []
     // Not using strict equality so that this acts as a
     // shortcut to checking for `null` and `undefined`.
     if (obj == null) {
         return results
     }
     if (Array.prototype.map && obj.map === Array.prototype.map) { return obj.map(iterator) }
     each(obj, function (value, index, list) {
         results.push(iterator(value, index, list))
     })
     return results
 }
 function getRegularPlugins(options) {
     if (window.navigator.plugins == null) {
         return 'not available';
     }
 
     var plugins = []
     // plugins isn't defined in Node envs.
     for (var i = 0, l = window.navigator.plugins.length; i < l; i++) {
         if (window.navigator.plugins[i]) { plugins.push(window.navigator.plugins[i]) }
     }
 
     // sorting plugins only for those user agents, that we know randomize the plugins
     // every time we try to enumerate them
     map(plugins, function (p) {
         var mimeTypes = map(p, function (mt) {
         return [mt.type, mt.suffixes]
         })
         return [p.name, p.description, mimeTypes]
     })
     return plugins;
 }
 function getIEPlugins(options) {
     var result = []
     if ((Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(window, 'ActiveXObject')) || ('ActiveXObject' in window)) {
         var names = [
         'AcroPDF.PDF', // Adobe PDF reader 7+
         'Adodb.Stream',
         'AgControl.AgControl', // Silverlight
         'DevalVRXCtrl.DevalVRXCtrl.1',
         'MacromediaFlashPaper.MacromediaFlashPaper',
         'Msxml2.DOMDocument',
         'Msxml2.XMLHTTP',
         'PDF.PdfCtrl', // Adobe PDF reader 6 and earlier, brrr
         'QuickTime.QuickTime', // QuickTime
         'QuickTimeCheckObject.QuickTimeCheck.1',
         'RealPlayer',
         'RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)',
         'RealVideo.RealVideo(tm) ActiveX Control (32-bit)',
         'Scripting.Dictionary',
         'SWCtl.SWCtl', // ShockWave player
         'Shell.UIHelper',
         'ShockwaveFlash.ShockwaveFlash', // flash plugin
         'Skype.Detection',
         'TDCCtl.TDCCtl',
         'WMPlayer.OCX', // Windows media player
         'rmocx.RealPlayer G2 Control',
         'rmocx.RealPlayer G2 Control.1'
         ]
         // starting to detect plugins in IE
         result = map(names, function (name) {
         try {
             // eslint-disable-next-line no-new
             new window.ActiveXObject(name)
             return name
         } catch (e) {
             return "error"
         }
         })
     } else {
         result.push('not available')
     }
     if (window.navigator.plugins) {
         result = result.concat(getRegularPlugins(options))
     }
     return result
 }
 function canvasKey(done, options) {
     if (isCanvasSupported()) {
         done(getCanvasFp())
         return
 }
 return 'not available';
 }
 function isCanvasSupported() {
     var elem = document.createElement('canvas')
     return !!(elem.getContext && elem.getContext('2d'))
 }
 function getHasLiedLanguages() {
     // We check if navigator.language is equal to the first language of navigator.languages
     // navigator.languages is undefined on IE11 (and potentially older IEs)
     if (typeof navigator.languages !== 'undefined') {
         try {
         var firstLanguages = navigator.languages[0].substr(0, 2)
         if (firstLanguages !== navigator.language.substr(0, 2)) {
             return true
         }
         } catch (err) {
         return true
         }
     }
     return false
 }
 function getHasLiedResolution() {
     return window.screen.width < window.screen.availWidth || window.screen.height < window.screen.availHeight
 }
 function getHasLiedOs() {
     var userAgent = navigator.userAgent.toLowerCase()
     var oscpu = navigator.oscpu
     var platform = navigator.platform.toLowerCase()
     var os
     // We extract the OS from the user agent (respect the order of the if else if statement)
     if (userAgent.indexOf('windows phone') >= 0) {
         os = 'Windows Phone'
     } else if (userAgent.indexOf('windows') >= 0 || userAgent.indexOf('win16') >= 0 || userAgent.indexOf('win32') >= 0 || userAgent.indexOf('win64') >= 0 || userAgent.indexOf('win95') >= 0 || userAgent.indexOf('win98') >= 0 || userAgent.indexOf('winnt') >= 0 || userAgent.indexOf('wow64') >= 0) {
         os = 'Windows'
     } else if (userAgent.indexOf('android') >= 0) {
         os = 'Android'
     } else if (userAgent.indexOf('linux') >= 0 || userAgent.indexOf('cros') >= 0 || userAgent.indexOf('x11') >= 0) {
         os = 'Linux'
     } else if (userAgent.indexOf('iphone') >= 0 || userAgent.indexOf('ipad') >= 0 || userAgent.indexOf('ipod') >= 0 || userAgent.indexOf('crios') >= 0 || userAgent.indexOf('fxios') >= 0) {
         os = 'iOS'
     } else if (userAgent.indexOf('macintosh') >= 0 || userAgent.indexOf('mac_powerpc)') >= 0) {
         os = 'Mac'
     } else {
         os = 'Other'
     }
     // We detect if the person uses a touch device
     var mobileDevice = (('ontouchstart' in window) ||
         (navigator.maxTouchPoints > 0) ||
         (navigator.msMaxTouchPoints > 0))
 
     if (mobileDevice && os !== 'Windows' && os !== 'Windows Phone' && os !== 'Android' && os !== 'iOS' && os !== 'Other' && userAgent.indexOf('cros') === -1) {
         return true
     }
 
     // We compare oscpu with the OS extracted from the UA
     if (typeof oscpu !== 'undefined') {
         oscpu = oscpu.toLowerCase()
         if (oscpu.indexOf('win') >= 0 && os !== 'Windows' && os !== 'Windows Phone') {
         return true
         } else if (oscpu.indexOf('linux') >= 0 && os !== 'Linux' && os !== 'Android') {
         return true
         } else if (oscpu.indexOf('mac') >= 0 && os !== 'Mac' && os !== 'iOS') {
         return true
         } else if ((oscpu.indexOf('win') === -1 && oscpu.indexOf('linux') === -1 && oscpu.indexOf('mac') === -1) !== (os === 'Other')) {
         return true
         }
     }
 
     // We compare platform with the OS extracted from the UA
     if (platform.indexOf('win') >= 0 && os !== 'Windows' && os !== 'Windows Phone') {
         return true
     } else if ((platform.indexOf('linux') >= 0 || platform.indexOf('android') >= 0 || platform.indexOf('pike') >= 0) && os !== 'Linux' && os !== 'Android') {
         return true
     } else if ((platform.indexOf('mac') >= 0 || platform.indexOf('ipad') >= 0 || platform.indexOf('ipod') >= 0 || platform.indexOf('iphone') >= 0) && os !== 'Mac' && os !== 'iOS') {
         return true
     } else if (platform.indexOf('arm') >= 0 && os === 'Windows Phone') {
         return false
     } else if (platform.indexOf('pike') >= 0 && userAgent.indexOf('opera mini') >= 0) {
         return false
     } else {
         var platformIsOther = platform.indexOf('win') < 0 &&
         platform.indexOf('linux') < 0 &&
         platform.indexOf('mac') < 0 &&
         platform.indexOf('iphone') < 0 &&
         platform.indexOf('ipad') < 0 &&
         platform.indexOf('ipod') < 0
         if (platformIsOther !== (os === 'Other')) {
         return true
         }
     }
 
     return typeof navigator.plugins === 'undefined' && os !== 'Windows' && os !== 'Windows Phone'
 }
 function getHasLiedBrowser() {
     var userAgent = navigator.userAgent.toLowerCase()
     var productSub = navigator.productSub
 
     // we extract the browser from the user agent (respect the order of the tests)
     var browser
     if (userAgent.indexOf('edge/') >= 0 || userAgent.indexOf('iemobile/') >= 0) {
         // Unreliable, different versions use EdgeHTML, Webkit, Blink, etc.
         return false
     } else if (userAgent.indexOf('opera mini') >= 0) {
         // Unreliable, different modes use Presto, WebView, Webkit, etc.
         return false
     } else if (userAgent.indexOf('firefox/') >= 0) {
         browser = 'Firefox'
     } else if (userAgent.indexOf('opera/') >= 0 || userAgent.indexOf(' opr/') >= 0) {
         browser = 'Opera'
     } else if (userAgent.indexOf('chrome/') >= 0) {
         browser = 'Chrome'
     } else if (userAgent.indexOf('safari/') >= 0) {
         if (userAgent.indexOf('android 1.') >= 0 || userAgent.indexOf('android 2.') >= 0 || userAgent.indexOf('android 3.') >= 0 || userAgent.indexOf('android 4.') >= 0) {
         browser = 'AOSP'
         } else {
         browser = 'Safari'
         }
     } else if (userAgent.indexOf('trident/') >= 0) {
         browser = 'Internet Explorer'
     } else {
         browser = 'Other'
     }
 
     if ((browser === 'Chrome' || browser === 'Safari' || browser === 'Opera') && productSub !== '20030107') {
         return true
     }
 
     // eslint-disable-next-line no-eval
     var tempRes = eval.toString().length
     if (tempRes === 37 && browser !== 'Safari' && browser !== 'Firefox' && browser !== 'Other') {
         return true
     } else if (tempRes === 39 && browser !== 'Internet Explorer' && browser !== 'Other') {
         return true
     } else if (tempRes === 33 && browser !== 'Chrome' && browser !== 'AOSP' && browser !== 'Opera' && browser !== 'Other') {
         return true
     }
 
     // We create an error to see how it is handled
     var errFirefox
     try {
         // eslint-disable-next-line no-throw-literal
         throw 'a'
     } catch (err) {
         try {
         err.toSource()
         errFirefox = true
         } catch (errOfErr) {
         errFirefox = false
         }
     }
     return errFirefox && browser !== 'Firefox' && browser !== 'Other'
 }
 function getTouchSupport() {
     var maxTouchPoints = 0
     var touchEvent
     if (typeof navigator.maxTouchPoints !== 'undefined') {
         maxTouchPoints = navigator.maxTouchPoints
     } else if (typeof navigator.msMaxTouchPoints !== 'undefined') {
         maxTouchPoints = navigator.msMaxTouchPoints
     }
     try {
         document.createEvent('TouchEvent')
         touchEvent = true
     } catch (_) {
         touchEvent = false
     }
     var touchStart = 'ontouchstart' in window
     return [maxTouchPoints, touchEvent, touchStart]
 }
 // Given two 64bit ints (as an array of two 32bit ints) returns the two
 // added together as a 64bit int (as an array of two 32bit ints).
 var x64Add = function (m, n) {
     m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]
     n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]
     var o = [0, 0, 0, 0]
     o[3] += m[3] + n[3]
     o[2] += o[3] >>> 16
     o[3] &= 0xffff
     o[2] += m[2] + n[2]
     o[1] += o[2] >>> 16
     o[2] &= 0xffff
     o[1] += m[1] + n[1]
     o[0] += o[1] >>> 16
     o[1] &= 0xffff
     o[0] += m[0] + n[0]
     o[0] &= 0xffff
     return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]
 }
 // Given two 64bit ints (as an array of two 32bit ints) returns the two
 // multiplied together as a 64bit int (as an array of two 32bit ints).
 var x64Multiply = function (m, n) {
     m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]
     n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]
     var o = [0, 0, 0, 0]
     o[3] += m[3] * n[3]
     o[2] += o[3] >>> 16
     o[3] &= 0xffff
     o[2] += m[2] * n[3]
     o[1] += o[2] >>> 16
     o[2] &= 0xffff
     o[2] += m[3] * n[2]
     o[1] += o[2] >>> 16
     o[2] &= 0xffff
     o[1] += m[1] * n[3]
     o[0] += o[1] >>> 16
     o[1] &= 0xffff
     o[1] += m[2] * n[2]
     o[0] += o[1] >>> 16
     o[1] &= 0xffff
     o[1] += m[3] * n[1]
     o[0] += o[1] >>> 16
     o[1] &= 0xffff
     o[0] += (m[0] * n[3]) + (m[1] * n[2]) + (m[2] * n[1]) + (m[3] * n[0])
     o[0] &= 0xffff
     return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]
 }
 // Given a 64bit int (as an array of two 32bit ints) and an int
 // representing a number of bit positions, returns the 64bit int (as an
 // array of two 32bit ints) rotated left by that number of positions.
 var x64Rotl = function (m, n) {
     n %= 64
     if (n === 32) {
     return [m[1], m[0]]
     } else if (n < 32) {
     return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]
     } else {
     n -= 32
     return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]
     }
 }
 // Given a 64bit int (as an array of two 32bit ints) and an int
 // representing a number of bit positions, returns the 64bit int (as an
 // array of two 32bit ints) shifted left by that number of positions.
 var x64LeftShift = function (m, n) {
     n %= 64
     if (n === 0) {
     return m
     } else if (n < 32) {
     return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n]
     } else {
     return [m[1] << (n - 32), 0]
     }
 }
 // Given two 64bit ints (as an array of two 32bit ints) returns the two
 // xored together as a 64bit int (as an array of two 32bit ints).
 var x64Xor = function (m, n) {
     return [m[0] ^ n[0], m[1] ^ n[1]]
 }
 // Given a block, returns murmurHash3's final x64 mix of that block.
 // (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the
 // only place where we need to right shift 64bit ints.)
 var x64Fmix = function (h) {
     h = x64Xor(h, [0, h[0] >>> 1])
     h = x64Multiply(h, [0xff51afd7, 0xed558ccd])
     h = x64Xor(h, [0, h[0] >>> 1])
     h = x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53])
     h = x64Xor(h, [0, h[0] >>> 1])
     return h
 }
 var x64hash128 = function (key, seed) {
     key = key || ''
     seed = seed || 0
     var remainder = key.length % 16
     var bytes = key.length - remainder
     var h1 = [0, seed]
     var h2 = [0, seed]
     var k1 = [0, 0]
     var k2 = [0, 0]
     var c1 = [0x87c37b91, 0x114253d5]
     var c2 = [0x4cf5ad43, 0x2745937f]
     for (var i = 0; i < bytes; i = i + 16) {
       k1 = [((key.charCodeAt(i + 4) & 0xff)) | ((key.charCodeAt(i + 5) & 0xff) << 8) | ((key.charCodeAt(i + 6) & 0xff) << 16) | ((key.charCodeAt(i + 7) & 0xff) << 24), ((key.charCodeAt(i) & 0xff)) | ((key.charCodeAt(i + 1) & 0xff) << 8) | ((key.charCodeAt(i + 2) & 0xff) << 16) | ((key.charCodeAt(i + 3) & 0xff) << 24)]
       k2 = [((key.charCodeAt(i + 12) & 0xff)) | ((key.charCodeAt(i + 13) & 0xff) << 8) | ((key.charCodeAt(i + 14) & 0xff) << 16) | ((key.charCodeAt(i + 15) & 0xff) << 24), ((key.charCodeAt(i + 8) & 0xff)) | ((key.charCodeAt(i + 9) & 0xff) << 8) | ((key.charCodeAt(i + 10) & 0xff) << 16) | ((key.charCodeAt(i + 11) & 0xff) << 24)]
       k1 = x64Multiply(k1, c1)
       k1 = x64Rotl(k1, 31)
       k1 = x64Multiply(k1, c2)
       h1 = x64Xor(h1, k1)
       h1 = x64Rotl(h1, 27)
       h1 = x64Add(h1, h2)
       h1 = x64Add(x64Multiply(h1, [0, 5]), [0, 0x52dce729])
       k2 = x64Multiply(k2, c2)
       k2 = x64Rotl(k2, 33)
       k2 = x64Multiply(k2, c1)
       h2 = x64Xor(h2, k2)
       h2 = x64Rotl(h2, 31)
       h2 = x64Add(h2, h1)
       h2 = x64Add(x64Multiply(h2, [0, 5]), [0, 0x38495ab5])
     }
     k1 = [0, 0]
     k2 = [0, 0]
     switch (remainder) {
       case 15:
         k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 14)], 48))
       // fallthrough
       case 14:
         k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 13)], 40))
       // fallthrough
       case 13:
         k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 12)], 32))
       // fallthrough
       case 12:
         k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 11)], 24))
       // fallthrough
       case 11:
         k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 10)], 16))
       // fallthrough
       case 10:
         k2 = x64Xor(k2, x64LeftShift([0, key.charCodeAt(i + 9)], 8))
       // fallthrough
       case 9:
         k2 = x64Xor(k2, [0, key.charCodeAt(i + 8)])
         k2 = x64Multiply(k2, c2)
         k2 = x64Rotl(k2, 33)
         k2 = x64Multiply(k2, c1)
         h2 = x64Xor(h2, k2)
       // fallthrough
       case 8:
         k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 7)], 56))
       // fallthrough
       case 7:
         k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 6)], 48))
       // fallthrough
       case 6:
         k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 5)], 40))
       // fallthrough
       case 5:
         k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 4)], 32))
       // fallthrough
       case 4:
         k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 3)], 24))
       // fallthrough
       case 3:
         k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 2)], 16))
       // fallthrough
       case 2:
         k1 = x64Xor(k1, x64LeftShift([0, key.charCodeAt(i + 1)], 8))
       // fallthrough
       case 1:
         k1 = x64Xor(k1, [0, key.charCodeAt(i)])
         k1 = x64Multiply(k1, c1)
         k1 = x64Rotl(k1, 31)
         k1 = x64Multiply(k1, c2)
         h1 = x64Xor(h1, k1)
       // fallthrough
     }
     h1 = x64Xor(h1, [0, key.length])
     h2 = x64Xor(h2, [0, key.length])
     h1 = x64Add(h1, h2)
     h2 = x64Add(h2, h1)
     h1 = x64Fmix(h1)
     h2 = x64Fmix(h2)
     h1 = x64Add(h1, h2)
     h2 = x64Add(h2, h1)
     return ('00000000' + (h1[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h1[1] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[0] >>> 0).toString(16)).slice(-8) + ('00000000' + (h2[1] >>> 0).toString(16)).slice(-8)
 }
 // 获取n级域名
function getsubdomain(domain,level){
     try{
         var subdomain = "";
         var domainList = domain.split('.');
         var ipAddressReg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/
         // 如果为ip或localhost，则直接返回
         if(ipAddressReg.test(domain) || domain === 'localhost'){
             return domain;
         }
         var subdomainItems = [];
         while(domainList.length && level > 0){
             subdomainItems.unshift(domainList.pop());
             level--;
         }
         subdomain = subdomainItems.join(".");
         return subdomain;
     }catch(e){
         return domain;
     }
 }
 // 创建cookie
 function setCookie(name, value, path, domain, time) {   // cookie名字、值、在哪个路由生效、在哪个域生效、过期时间
     // 过期时间
     var expires = new Date(),
         second =  time * 1000;
     expires.setTime(expires.getTime() + second);
     // 可访问cookie的路径
     path = path ? "path=" + path : "";
     // 可访问cookie的域
     // domain = getsubdomain(domain,3);
     // domain = domain ? "domain=." + domain : "";
     // 创建cookie
     // document.cookie = name + "=" + escape (value) + ";" + path + ";" + domain + ";expires=" + expires.toGMTString();
     document.cookie = name + "=" + escape (value) + ";" + path + ";expires=" + expires.toGMTString();
 }
 // 获取cookie
 function getCookie(name) {
     var arr = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
     if (arr) return unescape(arr[2]);
     else return null;
 }
 
 // 创建浏览器指纹
 function createFingerprint() {
     //生成浏览器指纹所依据的配置信息
     components = {
         "userAgent": window.navigator.userAgent,  // 用户代理
         "webdriver":window.navigator.webdriver,  // 网页内驱动软件：返回undefined说明正常浏览器，返回true说明使用Selenium模拟浏览器
         "language":window.navigator.language,  // 语言种类
         "colorDepth":window.screen.colorDepth,  // 目标设备或缓冲器上的调色板的比特深度
         "deviceMemory":window.navigator.deviceMemory || 'not available',  // 设备内存
         "hardwareConcurrency":window.navigator.hardwareConcurrency,  // 可用于运行在用户的计算机上的县城的逻辑处理器的数量
         "screenResolution":getScreenResolution(),  // 当前屏幕分辨率
         "availableScreenResolution":getAvailableScreenResolution(),  // 屏幕宽高（空白空间）
         "timezoneOffset":new Date().getTimezoneOffset(),  // 本地时间与GMT时间之间的时间差，以分钟为单位
         "timezone":getTimezone(),  // 时区
         "sessionStorage":hasSessionStorage(),  // 是否会话存储
         "localStorage":hasLocalStorage(),  // 是否具有本地存储
         "indexedDb":hasIndexedDB(),  // 是否具有索引DB
         "addBehavior":!!window.HTMLElement.prototype.addBehavior,  // IE是否制定addBehavior
         "openDatabase":!!window.openDatabase,  // 是否有打开的DB
         "cpuClass":window.navigator.cpuClass|| 'not available',  // 浏览器系统的CPU等级
         "platform":window.navigator.platform,  // 运行浏览器的操作系统和硬件平台
         "plugins":pluginsComponent(),  // 浏览器的插件信息
         //"canvas":canvasKey(),  // 使用canvas绘图
         //"webgl":"",  // webGL指纹信息
         //"webglVendorAndRenderer":"",  // 具有大量熵的webGL指纹的子集
         "hasLiedLanguages":getHasLiedLanguages(),  // 用户是否篡改了语言
         "hasLiedResolution":getHasLiedResolution(),  // 用户是否篡改了屏幕分辨率
         "hasLiedOs":getHasLiedOs(),  // 用户是都篡改了操作系统
         "hasLiedBrowser":getHasLiedBrowser(),  // 用户是否篡改了浏览器
         "touchSupport":getTouchSupport(),  // 触摸屏检测和能力
         //"fonts":"",  // 使用js/css检测到的字体列表
         //"audio":"",  // 音频处理
     }
     // 配置的值的数组
     var values = [];
     for(var key in components){
         if(components.hasOwnProperty(key)){
             values.push(components[key]);
         }
     }
     // 生成浏览器指纹
     var fingerprint = x64hash128(values.join(''), 31);
     return fingerprint;
 }
 // 判断父域名是否在黑名单
 function isParentInBlackList(){
     var isInBlack = false;
     for(var i = 0; i < blackList.length; i++){
         if(document.referrer.indexOf(blackList[i]) > -1){
             isInBlack = true;
             break;
         }
     }
     return isInBlack;
 }
 // 判断子窗口是否和父窗口在同一个父级域
 function compareDomain(domain,topDomain,level){
     var current = getsubdomain(domain,level);
     var parent = getsubdomain(topDomain,level);
     if(current === parent){
         return true;
     }
     return false;
 }
 
 
 
 // 主程序入口
 function _init() {
     var domain = document.location.hostname;
     var topDomain = document.referrer != "" ? new URL(document.referrer).hostname : "";
 
     if(isParentInBlackList()){
         return
     }
     // 当前用户没有cookie,写入cookie
     if(!(getCookie("X-Tag")==="gray")){
         var deviceInfo = createFingerprint();
         console.log("deviceInfo",deviceInfo);
         // 是否需要写入cookie：是灰度用户 且 当前域名不在黑名单中
         if(rules.test(deviceInfo) && blackList.indexOf(domain) == -1){
             setCookie("X-Tag","gray", "/",domain);
             //重定向，cookie需要刷新一次才生效
             location.reload();
         };
     };
     
     if(getCookie("X-Tag")==="gray"){
        isAddPapiGrayTag = true;   // 是否给papi请求头自定义灰度标识
     }     
 }
 
 try{
     _init();
 }catch(err){
     console.log(err);
 }


 try {
    function assignFun(a, b) {
        var aDeep = JSON.parse(JSON.stringify(a))
        var bDeep = JSON.parse(JSON.stringify(b))
        for (var key in bDeep) {
            aDeep[key] = bDeep[key];
        }
        return aDeep
    }
    
    var uu_function = function(wapbInfo, clientInfo) {
      var url = "//" + hitConfig.host + hitConfig.context + "/page/collection";
      var today = new Date();
      var dd = String(today.getDate());
      var mm = String(today.getMonth() + 1);  //January is 0!
      var yyyy = today.getFullYear();
      var hour = String(today.getHours());
      var minute = String(today.getMinutes());
      var second = String(today.getSeconds());

      dd = dd.length > 1 ? dd : '0' + dd;
      mm = mm.length > 1 ? mm : '0' + mm;
      hour = hour.length > 1 ? hour : '0' + hour;
      minute = minute.length > 1 ? minute : '0' + minute;
      second = second.length > 1 ? second : '0' + second;

      today = yyyy + mm + dd;
      var transtime = hour + minute + second;

      // 默认入参
      var params = {
        curmenuid: curPage.columnId || "",
        curmenu: getMetaInfo("ICBCChannel"),
        srcchannel: getQueryString("srcchannel"),
        transitionid: transitionId,
        word1: p_bp_init_param,
        word2: +new Date(),
        word3: "",
        word4: "",
        maincis: _icbcHitGetCookie('cisCode') ? _icbcHitGetCookie('cisCode') : "",
        userid: _icbcHitGetCookie('cisCode') ? _icbcHitGetCookie('cisCode') : "",
        buttonname: "",
        areanoname: "",
        event_type: "",
        transdate: Number(today),
        transtime: transtime,
        srcpageurl: p_bp_init_param.p_src_page_url || "",
        uagent: userAgent,
        stat_ss: "",
        sessionid: "",
        pvtype: 1,
        srcpageno: "",
        srcpagename: p_bp_init_param.p_src_page_name || "",
        curpageno: "",
        curpagename: p_bp_init_param.p_cur_page_name || "",
        curpageurl: p_bp_init_param.p_cur_page_url || "",
        staytime: "",
        title: "",
        scenetype: "",
        contentid: "",
        sessiontime: "",
        areano: "",
        buttonno: "",
        buttonseq: "",
        pushtitle: "",
        pushcontent: "",
        errorid: "",
        errordesp: "",
        areacode: "",
        areaname: "",
        noidendifiedcusid: "",
        struid: "",
        userlevel: ""
      }
      if (typeof wapbInfo == "object") {
        for (var key in wapbInfo) {
          if (wapbInfo.hasOwnProperty(key)) {
            wapbInfo[key] = decodeURIComponent(wapbInfo[key]);
          }
        }
        // params = Object.assign(params, wapbInfo);
        params = assignFun(params, wapbInfo);
      }
      if (typeof clientInfo == "object") {
        for (var key in clientInfo) {
          if (clientInfo.hasOwnProperty(key)) {
            clientInfo[key] = decodeURIComponent(clientInfo[key]);
          }
        }
        // params = Object.assign(params, clientInfo);
        params = assignFun(params, wapbInfo);
      }
      // 格式转换
      function jsonToUrlParams(jsonObj) {
        return Object.keys(jsonObj).map(function (key) {
          return encodeURIComponent(key) + '=' + encodeURIComponent(jsonObj[key]);
        }).join('&');
      }
      var urlParams = jsonToUrlParams(params);

      if (typeof _ajaxRequest != "undefined") {
        _ajaxRequest.post(
          url + '?' + urlParams,
          '',
          function (res) { }
        )
      } else if (typeof $ != "undefined") {
        $.ajax({
          type: "POST",
          url: url + '?' + urlParams,
          cache: false,
          async: true,
          crossDomain: true,
          timeout: 3000,
          //data: JSON.stringify(params),
          xhrFields: {
            withCredentials: false,
          },
        });
      }
    }
    var timer1_Num = 0;
    var timer1_SendHit = setInterval(function () {
      timer1_Num++;
      if (timer1_Num == 10) {
        console.log("到10s");
        clearInterval(timer1_SendHit);
      }
      if (typeof handleHitFromFIEPA === "function") {
        try {
          handleHitFromFIEPA = uu_function;
        } catch (error) {
          console.log(error);
        }
        clearInterval(timer1_SendHit);
      }
    }, 1000);
  } catch (error) {
    console.log(error);
  }
